<template>
	<view>
		首页
		<navigator open-type="navigateBack">返回</navigator>
		<navigator url="../log/log" open-type="redirect">日志</navigator>
		<view>{{user.name}}</view>
		<view>分数：{{user.score}}</view>
		<view><image :src="user.avatar" style="width:100rpx;height:100rpx"></image></view>
	</view>
</template>

<script setup>
	// 计算方法
	import {computed} from 'vue'
	// 导入仓库
	import {useUserStore} from '@/stores/useUserStore.js'	 
	// 使用仓库
	const userStore = useUserStore();
	// 计算出简洁的用户信息
	const user = computed(()=>userStore.userInfo)
</script>

<style>
</style>